/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.xcxAdmin.entity.ZtAdmin;

/**
 * 测试数据Entity
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Table(name = "zt_goodscoll", alias = "a", columns = {
		@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		
		@Column(name = "adminid", attrName = "ztAdmin.id", label = "小程序用户id"),
		@Column(name = "status", attrName = "status", label = "状态"),
		@Column(name = "goodsid", attrName = "ztGoods.id", label = "商品id"),
		
		@Column(name = "create_date", attrName = "createDate", label = "创建时间"),

}, joinTable = {
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtAdmin.class, attrName = "ztAdmin", alias = "z", on = "z.id = a.adminid", columns = {
				@Column(name = "name", attrName = "name", label = "小程序名称", queryType = QueryType.LIKE),
				@Column(name = "headimgurl", label = "小程序头像", attrName = "headimgurl"), 
				@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		}),
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtGoods.class, attrName = "ztGoods", alias = "g", on = "g.id = a.goodsid", columns = {

			@Column(name = "id", attrName = "id", label = "编号", isPK = true),
			@Column(name = "title", attrName = "title", label = "商品名称", queryType = QueryType.LIKE),
			@Column(name = "price", attrName = "price", label = "商品价格", queryType = QueryType.EQ)
			 })
				

}, orderBy = "a.create_date DESC")
public class ZtGoodscoll extends DataEntity<ZtGoodscoll> {

	private static final long serialVersionUID = 1L;
	private ZtGoods ztGoods;
	private ZtAdmin ztAdmin;
	private String status;
	
	private Integer pageNum;
	
	@JsonIgnore
	private Date createDate;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private Date updateDate;
	
	@JsonIgnore
	public Integer getPageNum() {
		return pageNum;
	}
	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}
	@JsonIgnore
	public ZtAdmin getZtAdmin() {
		return ztAdmin;
	}
	public void setZtAdmin(ZtAdmin ztAdmin) {
		this.ztAdmin = ztAdmin;
	}
	@JsonIgnore
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public ZtGoods getZtGoods() {
		return ztGoods;
	}
	public void setZtGoods(ZtGoods ztGoods) {
		this.ztGoods = ztGoods;
	}
	
	
	
	

}